<template>
    <div>
        <bm-data-select @change="handleChange" :dataArray="dataArray"></bm-data-select>
    </div>
</template>
  <script setup>
 import { reactive } from 'vue'

  defineOptions({
    name: "mdDataSelect",
  });

  const dataArray=reactive(
  [
    {
      name:"机构",
      active:true,
      id:"1",
      children:[
        {name:"杭州市一",id:"1-1",active:true},
        {name:"杭州市二",id:"1-2"},
        {name:"浙一院区",id:"1-3"},
      ]
    },
    {
      name:"科室",
      id:"2",
      children:[
        {name:"呼吸科",id:"2-1",active:true},
        {name:"眼科",id:"2-2"},
        {name:"耳鼻喉科",id:"2-3"},
      ]
    },
  ]
)
const handleChange = (val) => {
  console.log(val);
};
  </script>
  
  <style lang="scss" scoped></style>
  